package com.jm.gateway.conf;

import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * 网关白名单配置
 *
 * @author lime
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Component
@ConfigurationProperties(prefix = "secure")
public class SecureConf {
    /**
     * 限制ip每秒访问次数
     */
    private Long limitIpSecondCount;
    private Long limitIpMinuteCount;
    private Long limitIpHourCount;
    /**
     * ip 白名单
     */
    private List<String> ipWhites;
    /**
     * ip黑名单
     */
    private List<String> ipBlacks;
    /**
     * 白名单
     */
    private List<String> apiWhiteUris;
    /**
     * xss 黑名单
     */
    private List<String> xssBlackUris;
}
